package com.suncaper.tddmall.service;

import com.suncaper.tddmall.common.model.Category;
import com.suncaper.tddmall.mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PageServiceImpl implements PageService{
    @Autowired
    CategoryMapper categoryMapper;
    @Override
    public Integer countSearchByKeywords(String keywords) {

        return categoryMapper.countSearchByKeywords(keywords);
    }

    @Override
    public List<Category> searchByPageLimit(String keywords, Integer totalPage) {

        return categoryMapper.searchByPageLimit(keywords, totalPage);
    }
}
